<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglib.jsp" %>
<html>
<head>
    <title>首页</title>
    <meta content="test" name="test">
</head>
<body>
<!-- enter begin -->
<div style="width: 98%; clear: both; overflow: hidden;">

<div class="left" style="line-height: 18px;">
    <c:choose>
        <c:when test="${not empty sessionUser}">
            <span class="bold">
${sessionUser.nickname}&nbsp;
</span>
<br>
            头衔: ${f:userGroup(sessionUser.id).title} &nbsp;状态:
            <a href="${ctx}/user/logout.do?switchStatus">
            <c:choose>
                <c:when test="${f:onlineStatus(sessionUser.id)==2}">
                    正常模式
                </c:when>
                <c:otherwise>
                    隐身模式
                </c:otherwise>
            </c:choose>
                </a>
            <br>
您上次访问是在 <span>${i:cnTime(sessionUser.lastLoginTime)}</span><br>

        </c:when>
        <c:otherwise>
            <span class="bold">
游客&nbsp;
</span>
<br>
        </c:otherwise>
    </c:choose>

</div>

<div class="right" style="line-height: 18px;">
<a href="${ctx}/search.do?newestTopics">查看新帖</a> |
<a href="${ctx}/search.do?digest">精华区</a>
    <c:if test="${not empty sessionUser}">|
<a href="${ctx}/user/login.do?markread" id="ajax_markread">标记已读</a></c:if>
<a href="rss.php?auth=bahnAQKa608YAuLidi8j5EPUTe4p6dZr" target="_blank"><img src="${ctx}/imgs/xml.gif" border="0" class="absmiddle" alt="RSS 订阅全部论坛" /></a>
<br>
共 <span class="smalltxt">${actionBean.countTopic}</span> 篇主题 / <span class="smalltxt">${actionBean.countPost}</span> 篇帖子 / 今日 <span class="smalltxt">${i:isToday(settings['lastPostDate'])?settings['postCountToday']:'0'}</span> 篇帖子<br>
共 <span class="smalltxt">${actionBean.countUser}</span> 位会员 / 欢迎新会员 <a href="space-username-qq362248645.html"><span class="bold">${actionBean.newestUser.nickname}</span></a>
</div>

</div>

<!-- end #enter -->
<!-- board begin -->
<c:forEach items="${actionBean.groupForums}" var="groupForum">
    <%--<div class="box1">
        <div class="title"><a href="${ctx}/index.do?groupId=${groupForum.id}">${groupForum.name}</a></div>
    </div>--%>

    <div class="spaceborder spacebottom" style="width: 98%; clear: both; margin-top: 5px;"><table cellspacing="0" cellpadding="4" width="100%" align="center">
<tr><td colspan="
7
" class="header" style="padding-left:20px">
<div class="subtable" style="padding: 0px">
    <div class="right">
<a href="###" onclick="toggle_collapse('category_30');">
    <img id="category_30_img" src="${skinPath}/imgs/collapsed_no.gif" border="0" alt="" /></a>&nbsp;
</div><a href="${ctx}/index.do?groupId=${groupForum.id}">≡${groupForum.name}≡</a></div>
</td></tr>
<tbody id="category_30" style="">
<tr class="category" align="center">
<td width="5%">&nbsp;</td>
<td width="56%" align="left">论坛</td>
<td width="5%">主题</td>
<td width="5%">帖数</td>
<td width="13%">最后发表</td>
<td width="16%">版主</td>
</tr>

    <c:forEach items="${actionBean.forums[groupForum.id]}" var="forum">
    <c:choose>
        <c:when test="${empty sessionUser or forum.lastPost.createTime>sessionUser.lastLoginTime}">
            <c:set var="forumImg" value="${skinPath}/imgs/forum_new.gif"/>
        </c:when>
        <c:otherwise>
            <c:set var="forumImg" value="${skinPath}/imgs/forum.gif"/>
        </c:otherwise>
    </c:choose>
        <tr class="row" onMouseOver="this.style.backgroundColor='#F5FBFF'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td align="center"><img src="${forumImg}" alt="" /></td>
<td align="left" class="subject">
<a href="forum-29-1.html"><span class="bold"><a href="${ctx}/forum.do?forumId=${forum.id}" title="${forum.name}">□-${forum.name}</a></span></a>
<span class="todayposts">(今日：${i:isToday(forum.lastPost.createTime)?forum.postCountToday:'0'})</span>
<br><span class="smalltxt">${forum.description}</span></td>
<td align="center">${forum.topicCount}</td>
<td align="center">${forum.postCount}</td>
<td align="center" title="${forum.lastPost.title}" nowrap>
    <c:choose>
        <c:when test="${empty forum.lastPost}">
            无发贴人
        </c:when>
        <c:otherwise>
<span class="smalltxt"><a href="redirect.php?tid=640513&amp;goto=lastpost#lastpost">

${i:cnDate(forum.lastPost.createTime)}</a></span><br>by
<a href="space-username-pc77maikongjian.html">${empty forum.lastPost.authorName?'匿名':forum.lastPost.authorName}</a>
        </c:otherwise>
    </c:choose>
</td>
<td align="center" style="word-break: keep-all">
    <c:choose>
                    <c:when test="${empty forum.masters}">
                        暂无版主
                    </c:when>
                    <c:otherwise>
                        <c:forTokens items="${forum.mastersNickname}" delims="|" var="master">
                            <c:set var="tempMaster" value="${fn:split(master,',')}"></c:set>
                            <a title="查看版主${tempMaster[1]}的资料" href="dispuser.html?id=${tempMaster[0]}" rel="_blank">${tempMaster[1]}</a>
                        </c:forTokens>
                    </c:otherwise>
                </c:choose>
    </c:forEach>
        </tbody>
    </table>
    </div>
    <br>
</c:forEach>
<!-- end #board -->
<br>
<!-- count begin -->
<c:if test="${empty param.groupId}">
<div class="spaceborder" style="width: 98%">
    <table cellspacing="0" cellpadding="4" width="100%" align="center">
<tbody><tr class="header"><td colspan="3" class="smalltxt" style="font-weight: normal; color: #154BA0">
<a name="online"></a><a href="index.php?showoldetails=yes#online"><img src="${skinPath}/imgs/collapsed_yes.gif" align="right" border="0" alt="" /></a>
<span class="bold"><a href="member.php?action=online">在线用户</a></span> -
&nbsp;<span class="bold">${totalCounter}</span> 人在线 -
&nbsp;<span class="bold">${userCounter}</span> 位会员，-
&nbsp;<span class="bold">${totalCounter-userCounter}</span> 位游客| 最高纪录是 <span class="bold">${settings['highestTotalCounter']}</span> 于 <span class="bold">${settings['hignestTotalCounterTime']}</span>.
</td></tr></tbody>
<tbody>
<tr class="altbg2">
<td width="5%" align="center"><img src="${skinPath}/imgs/online.gif" alt="" /></td>
<td colspan="2">

<table cellspacing="0" cellpadding="0" border="0" width="98%" align="center">
<tr><td colspan="7" valign="middle"><img src="${skinPath}/imgs/online_admin.gif" alt="" />
    管理员 &nbsp; &nbsp; &nbsp; <img src="${skinPath}/imgs/online_admin.gif" alt="" />
    超级版主  &nbsp; &nbsp; &nbsp; <img src="${skinPath}/imgs/online_moderator.gif" alt="" />
    版主 &nbsp; &nbsp; &nbsp; <img src="${skinPath}/imgs/online_member.gif" alt="" />
    会员 &nbsp; &nbsp; &nbsp; </td></tr>
    </table>
</td></tr></tbody>
</table></div><br><br>
    </c:if>
<div class="tableborder" style="width: 300px; padding: 9px; background-color: #F5FBFF"><span class="smalltxt">
<img src="${skinPath}/imgs/forum_new.gif" class="absmiddle" alt="" />&nbsp; 有新帖的论坛&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<img src="${skinPath}/imgs/forum.gif" class="absmiddle" alt="" />&nbsp; 无新帖的论坛</span></div>

</body>
</html>